<template>
  <div class="page myDetail">
    <div class="scroll-view">
      <customHeader middleTitle="个人信息" />
      <div class="page-body">
        <ul class="form-style">
          <li>
            <span class="required">我的门店</span>
            <div><img src="../../assets/images/head-test.png" alt="" /> <span>></span></div>
          </li>
          <li>
            <span class="required">我的门店</span>
            <div> <span>正定店</span></div>
          </li>
          <li>
            <span class="required">姓名</span>
            <div>{{ data.name }}</div>
          </li>
          <li>
            <span class="required">性别</span>
            <div>男</div>
          </li>
          <li>
            <span class="required">手机号</span>
            <div>1999999999</div>
          </li>
          <li>
            <span class="required">员工ID</span>
            <div>{{ data.code ? data.code : "无" }}</div>
          </li>
          <li>
            <span class="required">我的角色</span>
            <div>{{ data.roleName }}</div>
          </li>
          <li>
            <span class="required">编制归属</span>
            <div>{{ data.affiliationName }}</div>
          </li>
     
        </ul>
      </div>
    </div>
  </div>
</template>

<script>
import Vue from "vue";
import customHeader from "../../components/header/header";
import { Toast } from "mint-ui";
import jsBridge from "../../tools/jsBridge.js";
export default {
  name: "myDetail",
  data() {
    return {
      data: "",
    };
  },
  methods: {
    getMYDetail() {
      this.ajax({
        url: "/newapp/employee/info.do",
        type: "get",
        controlLoading: true,
      })
        .then((res) => {
          console.log(res);
          if (res.success) {
            if (res.resultObject) {
              this.data = res.resultObject;
            } else {
              Toast(res.msg);
            }
          } else {
            Toast(res.msg);
          }
        })
        .catch((err) => {
          Toast(err.msg);
        });
    },
  },
  components: {
    customHeader,
  },
  mounted() {
    let param = this.$route.query;
    if (param.roleName) {
      this.data = param;
    } else {
      this.getMYDetail();
    }
  },
};
</script>
<style lang='scss' scoped>
@import "myDetail";
</style>
